package com.code.miaosha.mapper;

import com.code.miaosha.model.TGoodsInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface TGoodsInfoMapper {

    int deleteByPrimaryKey(@Param("code") String code);

    int insert(TGoodsInfo record);

    int getGoodsRest(@Param("code") String code);

    TGoodsInfo selectByPrimaryKey(String code);

    int updateAmount(@Param("code") String code, @Param("buys") int buys);

    int updateAmountByVersion(@Param("code") String code, @Param("buys") int buys, @Param("version") int version);

    int updateAmountByState(@Param("code") String code, @Param("buys") int buys);
}
